import {Meta, Story, ArgsTable, Canvas} from '@storybook/addon-docs';
import {Locale} from './Locale.tsx';

<Meta title="Components/Locale" component={Locale} args={{code: 'en_US'}} />

# Locale

## Usage

Component to display a locale (country and language) in Akeneo products.
To display correctly the flag on windows clients, you can use an external font like TwemojiCountryFlags or use one of your own.
## Playground

<Canvas>
  <Story name="Standard">
    {args => {
      return <Locale {...args} />;
    }}
  </Story>
</Canvas>

<ArgsTable story="Standard" />

# Variation on label

<Canvas>
  <Story name="Label">
    {args => {
      return (
        <>
          <Locale code="en_US" languageLabel="English" />
          <Locale code="fr_FR" languageLabel="Français" />
          <Locale code="de_DE" />
          <Locale code="pt_BR" />
        </>
      );
    }}
  </Story>
</Canvas>
